package reno.activity.eo;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "winnerlist", schema = "activity", catalog = "")
public class WinnerlistEntity {
    private int id;
    private long activityid;
    private String rewardname;
    private String winnerQq;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "activityid")
    public long getActivityid() {
        return activityid;
    }

    public void setActivityid(long activityid) {
        this.activityid = activityid;
    }

    @Basic
    @Column(name = "rewardname")
    public String getRewardname() {
        return rewardname;
    }

    public void setRewardname(String rewardname) {
        this.rewardname = rewardname;
    }

    @Basic
    @Column(name = "winnerQQ")
    public String getWinnerQq() {
        return winnerQq;
    }

    public void setWinnerQq(String winnerQq) {
        this.winnerQq = winnerQq;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        WinnerlistEntity that = (WinnerlistEntity) o;
        return activityid == that.activityid &&
                Objects.equals(rewardname, that.rewardname) &&
                Objects.equals(winnerQq, that.winnerQq);
    }

    @Override
    public int hashCode() {
        return Objects.hash(activityid, rewardname, winnerQq);
    }
}
